﻿using System;
using System.Numerics;
/*
  In the combinatorial mathematics, the Catalan numbers are calculated by the following formula:
  Cn = (2*n)!/((n+1)!*n!) n >=0
  Write a program to calculate the Nth Catalan number by given N.
 
 * C0 = 1;
 * C(n+1) = (2*(2n+1)/n+2)*Cn
 * 
 * 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670
 * 
 */ 

class CatalanNumbers
{
    static void Main(string[] args)
    {
        Console.Write("Enter N: ");
        double n = Double.Parse(Console.ReadLine());
        
        double result = 1;
        

        for (double i = 1; i <= n; i++)
        {
            Console.WriteLine("The Catalan number {0} is : {1}", i, result);
            result = ((2 * (2 * i + 1)) / (i + 2)) * result;
        }

    }
}